home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / util / cli / AKCC.lha / Programmers / Docs / akccplus.doc next >
Text File  |  2002-06-27  |  13KB  |  644 lines

  1.  
  2.    Here is a listing of all currently available functions of the
  3.    akcc_gen0.library in an Autodoc-like style of description :
  4.  
  5.         AKCC_StoreFile
  6.         AKCC_GetDate
  7.         AKCC_WildCmp
  8.         AKCC_Paths
  9.         AKCC_CopyFile
  10.         AKCC_TestEntry
  11.         AKCC_BStrCpy
  12.         AKCC_GetName
  13.         AKCC_FPrintf
  14.         AKCC_DelEnv
  15.         AKCC_ReadEnv
  16.         AKCC_WriteEnv
  17.         AKCC_Assign
  18.         AKCC_UnLineStr
  19.         AKCC_AddPathLock
  20.         AKCC_AddPathName
  21.         AKCC_RemPathName
  22.         AKCC_ParseText
  23.         AKCC_CheckAvailDevice
  24.         AKCC_SetDate
  25.  
  26. -----------------------------------------------------------------------------
  27.    Functions available since Version 37 :
  28. -----------------------------------------------------------------------------
  29.  
  30.    NAME
  31.         AKCC_StoreFile
  32.  
  33.    SYNOPSIS
  34.  
  35.         BYTE *AKCC_StoreFile(UBYTE *name, ULONG *bytes)
  36.                              A1           A2
  37.  
  38.    FUNCTION
  39.  
  40.         Loads a file into a buffer.
  41.  
  42.         Returns a pointer to the buffer or NULL.
  43.         BufferSize is stored in "bytes".
  44.  
  45.    INPUT(S)
  46.  
  47.         name  - FilePath
  48.         bytes - Pointer to ULONG
  49.  
  50.    RESULT
  51.  
  52.         Buffer, which contains the whole File or NULL.
  53.         Has to be freed via FreeMem() after use if non-NULL.
  54.  
  55.    SEE ALSO
  56.  
  57.         AKCC_CopyFile
  58.  
  59. -----------------------------------------------------------------------------
  60.  
  61.    NAME
  62.         AKCC_GetDate
  63.  
  64.    SYNOPSIS
  65.  
  66.         struct DateStruct *AKCC_GetDate(struct DateStamp *dos_rawdate)
  67.                                         A1
  68.    FUNCTION
  69.  
  70.         Converts a DOS DateStamp structure into a more common,
  71.         human readable, format.
  72.  
  73.         Returns a pointer to a structure or NULL.
  74.  
  75.    INPUT(S)
  76.  
  77.         dos_rawdate - Pointer to DateStamp-Struktur
  78.  
  79.    RESULT
  80.  
  81.         Pointer to DateStruct or NULL.
  82.         Has to be freed via FreeMem() after use if non-NULL.
  83.  
  84.    SEE ALSO
  85.  
  86.         DOS' date-functions
  87.  
  88. -----------------------------------------------------------------------------
  89.  
  90.    NAME
  91.         AKCC_WildCmp
  92.  
  93.    SYNOPSIS
  94.         long AKCC_WildCmp(UBYTE *orig, UBYTE *wild)
  95.                           A1           A2
  96.    FUNCTION
  97.  
  98.         Performs a WildCard comparion between a wildcard-string (wild)
  99.         and a usual string, which does not contain any wildcards (orig).
  100.  
  101.    INPUT(S)
  102.  
  103.         orig - non-wildcard string to compare
  104.         wird - wildcard-string for comparison
  105.  
  106.    RESULT
  107.  
  108.         TRUE  for "wildcard matches",
  109.         FALSE for "wildcard does not match" (or error).
  110.  
  111.    SEE ALSO
  112.  
  113.         -
  114.  
  115. -----------------------------------------------------------------------------
  116.  
  117.    NAME
  118.         AKCC_Paths
  119.  
  120.    SYNOPSIS
  121.  
  122.         long AKCC_Paths(UBYTE *name, UBYTE *rootdir, UBYTE *dir, UBYTE *comp)
  123.                         A1           A2              A3          A4
  124.  
  125.    FUNCTION
  126.  
  127.         Splits a Dir(File)Path into two (three) parts :
  128.  
  129.          - rootdir : RootDirPath (without "/", but with ":", if Device)
  130.          - dir     : DirPath     (with "/", if no Device)
  131.          - comp    : FileName    (may contain WildCards)
  132.  
  133.    INPUT(S)
  134.  
  135.         name    - path to split
  136.         rootdir - Pointer to buffer for RootDirPath
  137.         dir     - Pointer to buffer for DirPath
  138.         comp    - Pointer to buffer for FileName
  139.  
  140.    RESULT
  141.  
  142.         TRUE for "was a DirPath",
  143.         FALSE for "was a FilePath".
  144.  
  145.         Do not use this value for any plausibility checks on Files/Dirs.
  146.         It may be wrong for your purposes.
  147.  
  148.    SEE ALSO
  149.  
  150.         -
  151.  
  152. -----------------------------------------------------------------------------
  153.  
  154.    NAME
  155.         AKCC_CopyFile
  156.  
  157.    SYNOPSIS
  158.  
  159.         long AKCC_CopyFile(UBYTE *sourcename, UBYTE *destname)
  160.                            A1                 A2
  161.  
  162.    FUNCTION
  163.  
  164.         Copies a file (sourcename) to an other (destname).
  165.         Buffer allocation and delocation is done auto- and dynamically.
  166.  
  167.    INPUT(S)
  168.  
  169.         sourcename - Name of SourceFile
  170.         destname   - Name of DestFile
  171.  
  172.    RESULT
  173.  
  174.         TRUE for "action succesful",
  175.         FALSE for "error occured".
  176.  
  177.    SEE ALSO
  178.  
  179.         AKCC_StoreFile
  180.  
  181. -----------------------------------------------------------------------------
  182.  
  183.    NAME
  184.         AKCC_TestEntry
  185.  
  186.    SYNOPSIS
  187.  
  188.         long AKCC_TestEntry(UBYTE *entryname)
  189.                             A1
  190.  
  191.    FUNCTION
  192.  
  193.         Make some "trial-and-error" assumptions about the given
  194.         "entryname" to find out, whether it's a File, Dir or
  195.         virtual (!) Device (e.g. "CON").
  196.  
  197.         Does some Open() and Lock() calls to decide this logically.
  198.  
  199.    INPUT(S)
  200.  
  201.         entryname - Name of the "objektes"
  202.  
  203.    RESULT
  204.  
  205.         Special code, descrbing the "object" (see Includes)
  206.  
  207.    SEE ALSO
  208.  
  209.         -
  210.  
  211. -----------------------------------------------------------------------------
  212.  
  213.    NAME
  214.         AKCC_BStrCpy
  215.  
  216.    SYNOPSIS
  217.  
  218.         void AKCC_BStrCpy(UBYTE *dest, UBYTE *bstr, UBYTE *hangon)
  219.                           A1           A2           A3
  220.  
  221.    FUNCTION
  222.  
  223.         Copies a BCPL-String to a C-String and concatenates "hangon"
  224.         to it (if non-NULL).
  225.  
  226.         This is e.g. useful to create a Device-Name from a
  227.         BSTR ( BSTR: "DF0" -> C-STR: "DF0:").
  228.  
  229.    INPUT(S)
  230.  
  231.         dest   - Pointer to string buffer
  232.         bstr   - Pointer to BCPL-String
  233.         hangon - Pointer to string or NULL.
  234.  
  235.    RESULT
  236.  
  237.         -
  238.  
  239.    SEE ALSO
  240.  
  241.         -
  242.  
  243. -----------------------------------------------------------------------------
  244.  
  245.    NAME
  246.         AKCC_GetName
  247.  
  248.    SYNOPSIS
  249.  
  250.         void AKCC_GetName(BPTR dest, BPTR fl, UBYTE *name)
  251.                           A1         A2       A3
  252.  
  253.    FUNCTION
  254.  
  255.         Get full Path of a File/Dir from a Lock (BPTR).
  256.  
  257.         The _same_ lock has to be passed twice (one copy is used as
  258.         a break condition for this recursive called function).
  259.  
  260.    INPUT(S)
  261.  
  262.         dest   - File/Dir Lock (BPTR)
  263.         fl     - same as dest
  264.         name   - string buffer for the resulting path
  265.                  (at least 256 Bytes)
  266.  
  267.    RESULT
  268.  
  269.         -
  270.  
  271.    SEE ALSO
  272.  
  273.         -
  274.  
  275. -----------------------------------------------------------------------------
  276.  
  277.    NAME
  278.         AKCC_FPrintf
  279.  
  280.    SYNOPSIS
  281.  
  282.         void AKCC_FPrintf(BPTR outhandle, UBYTE *text, APTR pararr)
  283.                           A1              A2           A3
  284.  
  285.    FUNCTION
  286.  
  287.         Similar to "printf()", but uses RawDoFmt() to perform the output.
  288.  
  289.         Parameters have to be passed in an ULONG array (remember to
  290.         specify "%lc" instead of "%c", etc.).
  291.         The resulting string is written to outhandle (e.g. Output()).
  292.  
  293.    INPUT(S)
  294.  
  295.         outhandle - DosHandle for write-accesses
  296.         text      - format string (printf)
  297.         pararr    - array of args for format string
  298.  
  299.    RESULT
  300.  
  301.         -
  302.  
  303.    SEE ALSO
  304.  
  305.         AKCC_ParseText
  306.  
  307. -----------------------------------------------------------------------------
  308.  
  309.    NAME
  310.         AKCC_DelEnv
  311.  
  312.    SYNOPSIS
  313.  
  314.         long AKCC_DelEnv(UBYTE *var)
  315.                          A1
  316.  
  317.    FUNCTION
  318.  
  319.         Deletes an ENV-Variable.
  320.  
  321.    INPUT(S)
  322.  
  323.         var     - variable name
  324.  
  325.    RESULT
  326.  
  327.         Boolean.
  328.  
  329.    SEE ALSO
  330.  
  331.         AKCC_ReadEnv, AKCC_WriteEnv
  332.  
  333. -----------------------------------------------------------------------------
  334.  
  335.    NAME
  336.         AKCC_ReadEnv
  337.  
  338.    SYNOPSIS
  339.  
  340.         long AKCC_ReadEnv(UBYTE *var, UBYTE *content)
  341.                           A1          A2
  342.  
  343.    FUNCTION
  344.  
  345.         Reads an ENV-Variable to a buffer.
  346.  
  347.    INPUT(S)
  348.  
  349.         var     - variable name
  350.         content - buffer for content of variable
  351.  
  352.    RESULT
  353.  
  354.         Boolean.
  355.  
  356.    SEE ALSO
  357.  
  358.         AKCC_DelEnv, AKCC_WriteEnv
  359.  
  360. -----------------------------------------------------------------------------
  361.  
  362.    NAME
  363.         AKCC_WriteEnv
  364.  
  365.    SYNOPSIS
  366.  
  367.         long AKCC_WriteEnv(UBYTE *var, UBYTE *content)
  368.                            A1          A2
  369.  
  370.    FUNCTION
  371.  
  372.         Writes/Creates an ENV-Variable from a buffer.
  373.  
  374.    INPUT(S)
  375.  
  376.         var     - variable name
  377.         content - content of variableü
  378.    RESULT
  379.  
  380.         Boolean.
  381.  
  382.    SEE ALSO
  383.  
  384.         AKCC_DelEnv, AKCC_ReadEnv
  385.  
  386. -----------------------------------------------------------------------------
  387.  
  388.    NAME
  389.  
  390.         AKCC_Assign
  391.  
  392.    SYNOPSIS
  393.  
  394.         long AKCC_Assign(UBYTE *ass_name, UBYTE *ass_path)
  395.                          A1               A2
  396.  
  397.    FUNCTION
  398.  
  399.         Assigns "ass_name" (e.g. "SYS:") to ass_path (e.g. "DF0:"
  400.         or "DF0:Sys".
  401.  
  402.         Assigns to Files are legal and possible.
  403.  
  404.    INPUT(S)
  405.  
  406.         ass_name - AssignName (ended with ":")
  407.         ass_path - AssignPath
  408.  
  409.    RESULT
  410.  
  411.         Boolean.
  412.  
  413.    SEE ALSO
  414.  
  415.         -
  416.  
  417. -----------------------------------------------------------------------------
  418.  
  419.    NAME
  420.  
  421.         AKCC_UnLineStr
  422.  
  423.    SYNOPSIS
  424.  
  425.         void AKCC_UnLineStr(UBYTE *dest, UBYTE *source)
  426.                             A1           A2
  427.  
  428.    FUNCTION
  429.  
  430.         Removes any controlcodes (return, linefeed, etc)
  431.         from a string to minimize side-effects, when displaying it.
  432.  
  433.    INPUT(S)
  434.  
  435.         dest   - destination buffer
  436.         source - source string
  437.  
  438.    RESULT
  439.  
  440.         -
  441.  
  442.    SEE ALSO
  443.  
  444.         -
  445.  
  446. -----------------------------------------------------------------------------
  447.  
  448.    NAME
  449.  
  450.         AKCC_AddPathLock
  451.  
  452.    SYNOPSIS
  453.  
  454.         long AKCC_AddPathLock(BPTR lock)
  455.                               A1
  456.  
  457.    FUNCTION
  458.  
  459.         Adds a new Path to the search-list of the CLI/Shell.
  460.  
  461.         Uses a Lock as source.
  462.  
  463.    INPUT(S)
  464.  
  465.         lock - lock to a directory
  466.  
  467.    RESULT
  468.  
  469.         Boolean.
  470.  
  471.    WARNING
  472.  
  473.         Be careful using this function under OS V36.
  474.         Read the Includes for more information.
  475.  
  476.    SEE ALSO
  477.  
  478.         AKCC_AddPathName, AKCC_RemPathName, AKCC_GetName
  479.  
  480. -----------------------------------------------------------------------------
  481.  
  482.    NAME
  483.  
  484.         AKCC_AddPathName
  485.  
  486.    SYNOPSIS
  487.  
  488.         long AKCC_AddPathName(UBYTE *name)
  489.                               A1
  490.  
  491.    FUNCTION
  492.  
  493.         Adds a new Path to the search-list of the CLI/Shell.
  494.  
  495.         Uses a PathName as source.
  496.  
  497.    INPUT(S)
  498.  
  499.         name - PathName
  500.  
  501.    RESULT
  502.  
  503.         Boolean.
  504.  
  505.    WARNING
  506.  
  507.         Be careful using this function under OS V36.
  508.         Read the Includes for more information.
  509.  
  510.    SEE ALSO
  511.  
  512.         AKCC_AddPathLock, AKCC_RemPathName
  513.  
  514. -----------------------------------------------------------------------------
  515.  
  516.    NAME
  517.  
  518.         AKCC_RemPathName
  519.  
  520.    SYNOPSIS
  521.  
  522.         long AKCC_RemPathName(UBYTE *name)
  523.                               A1
  524.  
  525.    FUNCTION
  526.  
  527.         Removes a Path from the search-list of the CLI/Shell.
  528.  
  529.         Uses a PathName as source.
  530.  
  531.    INPUT(S)
  532.  
  533.         name - PathName
  534.  
  535.    RESULT
  536.  
  537.         Boolean.
  538.  
  539.    WARNING
  540.  
  541.         Be careful using this function under OS V36.
  542.         Read the Includes for more information.
  543.  
  544.    SEE ALSO
  545.  
  546.         AKCC_AddPathName, AKCC_AddPathLock
  547.  
  548. -----------------------------------------------------------------------------
  549.  
  550.    NAME
  551.  
  552.         AKCC_ParseText
  553.  
  554.    SYNOPSIS
  555.  
  556.         void AKCC_ParseText(UBYTE *orig, UBYTE *new)
  557.                             A1           A2
  558.  
  559.    FUNCTION
  560.  
  561.         Parses a string, which may contain many special control-codes.
  562.  
  563.         Output may e.g. be printed by AKCC_FPrintf() or any other
  564.         output function.
  565.  
  566.    INPUT(S)
  567.  
  568.         orig - formatted text (see Includes for details)
  569.         new  - resulting output string
  570.                (controlcodes replaced by their "content")
  571.  
  572.    RESULT
  573.  
  574.         -
  575.  
  576.    SEE ALSO
  577.  
  578.         AKCC_FPrintf, C-Ausgabe-functionen, DOS-Ausgabe-functionen
  579.  
  580. -----------------------------------------------------------------------------
  581.  
  582.    NAME
  583.  
  584.         AKCC_CheckAvailDevice
  585.  
  586.    SYNOPSIS
  587.  
  588.         long AKCC_CheckAvailDevice(UBYTE *dev_name)
  589.                                    A1
  590.  
  591.    FUNCTION
  592.  
  593.         Checks, if a special Device (e.g. "PRT:", "NEWCON:")
  594.         is available, without trying to actually open it.
  595.  
  596.         This only works for Devices (no Volumes or Dirs).
  597.        
  598.         NO REQUESTER WILL APPEAR, if the Device is NOT AVAILABLE !
  599.         (Dos-Lists are read and checked.)
  600.  
  601.    INPUT(S)
  602.  
  603.         dev_name - DeviceName
  604.  
  605.    RESULT
  606.  
  607.         Boolean.
  608.  
  609.    SEE ALSO
  610.  
  611.         AKCC_Assign
  612.  
  613. -----------------------------------------------------------------------------
  614.  
  615.    NAME
  616.  
  617.         AKCC_SetDate
  618.  
  619.    SYNOPSIS
  620.  
  621.         long AKCC_SetDate(struct DateStruct *gd_date)
  622.                           A1
  623.  
  624.    FUNCTION
  625.  
  626.         Resets the internal CIA-Timers to reflect the Date, which
  627.         is passed in "gd_date".
  628.  
  629.         The RealTimeClock is NOT set (too may derivates).
  630.  
  631.    INPUT(S)
  632.  
  633.         gd_date - DateStruct pointer (e.g. returned by AKCC_GetDate())
  634.  
  635.    RESULT
  636.  
  637.         -
  638.  
  639.    SEE ALSO
  640.  
  641.         AKCC_GetDate
  642.  
  643. -----------------------------------------------------------------------------
  644.